package itsos.dao;

import org.springframework.orm.ibatis.support.*;
import itsos.model.*;
import java.util.*;

public class MemberDao extends SqlMapClientDaoSupport {

	public Member getMember(long memberID)
	{
		return (Member) getSqlMapClientTemplate().queryForObject("Member.getMemberByMemberID", memberID);
	}
	
	public Member doLogin(String loginID)
	{
		return (Member) getSqlMapClientTemplate().queryForObject("Member.doLogin", loginID);
	}
	
	public Member getUserName(long memberID)
	{
		return (Member)getSqlMapClientTemplate().queryForObject("Member.getUserName", memberID);
	}
	
	public Member getUserName2(String loginID)
	{
		return (Member)getSqlMapClientTemplate().queryForObject("Member.getUserName2", loginID);
	}
	
	public void insertMember(Member member)
	{
		getSqlMapClientTemplate().insert("Member.insertMember", member);
	}
	
	public void updateMember(Member member)
	{
		getSqlMapClientTemplate().update("Member.updateMember", member);
	}
	
	public void deleteMember(Member member)
	{
		getSqlMapClientTemplate().update("Member.deleteMember", member);
	}
	
	public List getLoginID()
	{
		return getSqlMapClientTemplate().queryForList("Member.getLoginID");
	}
	
	public void saveGroup(Member member)
	{
		getSqlMapClientTemplate().update("Member.saveGroup", member);
	}
	
	public List adminSelect()
	{
		return (List)getSqlMapClientTemplate().queryForList("Member.selectadmin");
	}
	
	public List devMember()
	{
		return (List)getSqlMapClientTemplate().queryForList("Member.devMember");
	}
	
}